package com.neuedu.yyzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.neuedu.yyzx.entity.LifeRemind;
import com.neuedu.yyzx.mapper.LifeRemindMapper;
import com.neuedu.yyzx.service.ILifeRemindService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 第7组....
 * @since 2021-04-28
 */
@Service
public class LifeRemindServiceImpl extends ServiceImpl<LifeRemindMapper, LifeRemind> implements ILifeRemindService {




    @Override
    public Object list(LifeRemind lifeRemind) {
        return null;
    }

    @Override
    public boolean add(LifeRemind lifeRemind) {
       QueryWrapper<LifeRemind> wrapper =new QueryWrapper<>();
       wrapper.eq("name",lifeRemind.getName());

       LifeRemind query=this.getOne(wrapper);
       if (query==null)
           return  this.save(lifeRemind);
       return  false;

    }

    @Override
    public boolean update(LifeRemind lifeRemind) {
        return false;
    }

    @Override
    public Object delById(LifeRemind lifeRemind) {
        return null;
    }


}
